<div id="account-svn-tokens">
    <h3 class="account-title">
        <i class="tuleap-services-svn"></i>{{ svn_tokens_title }}
        <a href="javascript:help_window('/help/show_help.php?section=citizen.html#account-maintenance')">
            <i class="icon-question-sign help-button"></i>
        </a>
    </h3>

    <p class="help">{{{ svn_tokens_help }}}</p>

    {{# last_svn_token }}
    <p class="alert alert-success"><i class="icon-ok"></i> {{ generated_svn_token }} <span class="svn-generated-token">{{ last_svn_token }}</span></p>
    {{/ last_svn_token }}

    {{# has_svn_tokens }}
        <form action="manage_svn_tokens.php" method="post">
    {{/ has_svn_tokens }}

    <table class="table table-bordered table-striped svn-tokens-table">
        <thead>
            <tr>
                <th></th>
                <th>{{ svn_token_generated_date }}</th>
                <th>{{ svn_token_last_usage }}</th>
                <th>{{ svn_token_last_ip }}</th>
                <th>{{ svn_token_comment }}</th>
            </tr>
        </thead>
        {{# has_svn_tokens }}
            <tbody>
                {{# svn_tokens }}
                <tr>
                    <td><input type="checkbox" name="svn-tokens-selected[]" value="{{ id }}"/></td>
                    <td>{{ generated_date }}</td>
                    <td>{{ last_used_on }}</td>
                    <td>{{ last_used_by }}</td>
                    <td>{{ comment }}</td>
                </tr>
                {{/ svn_tokens }}
            </tbody>
        {{/ has_svn_tokens }}
        {{^ has_svn_tokens }}
            <tbody>
                <tr>
                    <td class="empty-table" colspan="5">{{ svn_tokens_no_token }}</td>
                </tr>
            </tbody>
        {{/ has_svn_tokens }}
    </table>

    <div id="user-svn-tokens-action">
        <a class="btn btn-primary" href="#svn-tokens-generate-modal" data-toggle="modal">
            <i class="icon-plus"></i> {{ generate_svn_token_button }}
        </a>

        {{# has_svn_tokens }}
        <button type="submit"
                id="button-delete-svn-tokens"
                name="delete-svn-tokens"
                class="btn btn-danger"
                disabled
        >
            <i class="icon-trash"></i> {{ delete_svn_tokens_button }}
        </button>
        {{/ has_svn_tokens }}
    </div>

    {{# has_svn_tokens }}
        {{{ csrf_input_html }}}
        </form>
    {{/ has_svn_tokens }}

    {{> svn-tokens-generate-modal }}
</div>
